﻿namespace PMS.Services.Utils.BaiduAPI
{
    public class BaiduIpAddressDetail
    {
        public string province { get; set; }
        public string city { get; set; }
        public string district { get; set; }
        public string street { get; set; }
        public string street_number { get; set; }
        public string city_code { get; set; }
    }
    public class BaiduIpAddressPoint
    {
        public string y { get; set; }
        public string x { get; set; }
    }
    public class BaiduIpAddressContent
    {
        public BaiduIpAddressDetail address_detail { get; set; }
        public string address { get; set; }
        public BaiduIpAddressPoint point { get; set; }
    }

    //Api response Json: 
    //{
    //   "address": "CN|\u4e91\u5357|\u6606\u660e|None|CHINANET|0|0",
    //   "content": {
    //      "address_detail": {
    //	        "province": "\u4e91\u5357\u7701",
    //	        "city": "\u6606\u660e\u5e02",
    //	        "district": "",
    //	        "street": "",
    //	        "street_number": "",
    //	        "city_code": 104
    //      },
    //      "address": "\u4e91\u5357\u7701\u6606\u660e\u5e02",
    //      "point": {
    //	        "y": "2863528.35",
    //	        "x": "11434261.51"
    //      }
    //    },
    //    "status": 0
    //}
    public class BaiduIpAddressResponse
    {
        public string address { get; set; }
        public BaiduIpAddressContent content { get; set; }
        public int status { get; set; }
        public string message { get; set; }
    }
}
